package cn.net.isir.common.sms;

import com.github.qcloudsms.SmsSingleSenderResult;
import cn.net.isir.common.config.SMSConfig;

public class SMSUtils {

    /**
     * send verification code
     *
     * @param mobile mobile
     * @param code   verification code
     * @return 发送结果
     */
    public static SMSResult sendVerCode(String mobile, String code) {
        SmsSingleSenderResult result = SMSSender.send(SMSConfig.getTemplateId(), mobile, new String[]{code, "5"});
        return SMSSender.smsSenderResultHandle(new String[]{mobile}, result.getResponse());
    }
}
